home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
anwendungen
/
gw print
/
structurebrowser_v1.3
/
sources
/
sbrequest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-20
|
4KB
|
144 lines
/*
Handles Intuition Requester structure
*/
#include "header/sb.h"
extern int level; /* recursion level */
/* PrRequester
Put up the first page of data for a Requester structure.
*/
PrRequester (string, requester)
char *string;
struct Requester *requester;
{
static struct StructData structdata[] = {
{ " OlderRequest", "struct Requester *", PRPTR, PTRSIZE },
{ "-LeftEdge", "SHORT", PRINT, INTSIZE },
{ "-TopEdge", "SHORT", PRINT, INTSIZE },
{ "-Width", "SHORT", PRINT, INTSIZE },
{ "-Height", "SHORT", PRINT, INTSIZE },
{ "-RelLeft", "SHORT", PRINT, INTSIZE },
{ "-RelTop", "SHORT", PRINT, INTSIZE },
{ " ReqGadget", "struct Gadget *", PRPTR, PTRSIZE },
{ " ReqBorder", "struct Border *", PRPTR, PTRSIZE },
{ " ReqText", "struct IntuiText *", PRPTR, PTRSIZE },
{ " Flags", "USHORT", PRUINT, INTSIZE },
{ "-BackFill", "UBYTE", PRUBYTE, BYTESIZE },
{ "-(padding)", "UBYTE", PRUBYTE, BYTESIZE },
{ " ReqLayer", "struct Layer *", PRPTR, PTRSIZE },
{ " ReqPad1[32]", "UBYTE", PRNULL, BYTESIZE * 32},
{ " ImageBMap", "struct BitMap *", PRPTR, PTRSIZE }
};
static char *flagnames[16] = {
"POINTREL", "PREDRAWN", "NOISYREQ", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
"REQOFFWINDOW", "REQACTIVE", "SYSREQUEST", "DEFERREFRESH"
};
int i, sum;
int choice = -1;
level++;
while (choice)
{
sum = SetOptionText(string, structdata, (APTR)requester, DATASIZE, 0);
switch (choice = GetChoice(MAXGADG + 1))
{
case 1:
if (requester->OlderRequest)
PrRequester("The Requester rendered before this one",
requester->OlderRequest);
break;
case 8:
if (requester->ReqGadget)
PrGadget("The first Gadget for this Requester",
requester->ReqGadget);
break;
case 9:
if (requester->ReqBorder)
PrBorder("The Border structure for this Requester",
requester->ReqBorder);
break;
case 10:
if (requester->ReqText)
PrIText("The IntuiText structure for this Requester's text",
requester->ReqText);
break;
case 11:
FlagPrint("Flags set for this Requester",
flagnames, (ULONG)requester->Flags);
break;
case 14:
if (requester->ReqLayer)
PrLayer("The Layer for this Requester", requester->ReqLayer);
break;
case 15:
HexDump("Hexdump of this Requester's pad bytes (group 1)",
&requester->ReqPad1[0], BYTESIZE, (long)BYTESIZE * 32);
break;
case 16:
if (requester->ImageBMap)
PrBitMap("Custom BitMap structure for this Requester",
requester->ImageBMap);
break;
case MOREGADG:
PrRequester2("Requester members (page 2)", requester, sum);
break;
}
}
level--;
}
/* PrReq2
Put up the second page of data for a Requester structure.
*/
PrRequester2 (string, requester, offset)
char *string;
struct Requester *requester;
int offset;
{
static struct StructData structdata[] = {
{ " RWindow", "struct Window *", PRPTR, PTRSIZE },
{ " ReqPad2[36]", "UBYTE", PRNULL, BYTESIZE * 36}
};
int i, sum;
int choice = -1;
level++;
while (choice)
{
sum = SetOptionText(string, structdata,
(APTR)requester, DATASIZE, offset);
switch (choice = GetChoice(DATASIZE))
{
case 1:
if (requester->RWindow)
PrWindow("This Requester's Window",
requester->RWindow);
break;
case 2:
HexDump("Hexdump of this Requester's pad bytes (group 2)",
&requester->ReqPad2[0], BYTESIZE, (long)BYTESIZE * 36);
break;
}
}
level--;
}